package lab02.test21;

/**
 * Created by dell on 2017/10/30.
 */
public class Test {
    static String temp="sunsiyu";
    public static  int amount(String s,char c)
    {
        int cmt=0;
        for(int i=0;i<s.length();i++)
        {
            if(s.charAt(i)==c)
            {
                cmt++;
            }
        }
        return cmt;
    }
    public static void main(String args[])
    {
        System.out.println(amount(temp,'s'));
    }
}
